import type { RouteRecordRaw } from "vue-router";

// 静态路由
export const staticRoutes: Array<RouteRecordRaw> = [
  {
    path: "/",
    component: () => import("@/views/home/index.vue"),
    children: [
      {
        path: "/",
        name: "Recommend",
        component: () => import("@/views/recommend/index.vue"),
      },
      {
        path: "/home/:moduleKey?",
        name: "Voicebook",
        component: () =>
          import("@/views/voicebook/components/moduleRankDatas/index.vue"),
        // props(route) {
        //   return {
        //     ...route.params,
        //   };
        // },
      },
    ],
  },
  {
    path: "/top",
    name: "Top",
    component: () => import("@/views/rank/index.vue"),
  },
  {
    path: "/channel",
    name: "Category",
    component: () => import("@/views/category/index.vue"),
  },
  {
    path: "/ting/remen",
    name: "Listening",
    component: () => import("@/views/listening/index.vue"),
  },
  {
    path: "/detail/:id",
    name: "Detail",
    component: () => import("@/views/detail/index.vue"),
  },
  {
    path: "/sound/:id",
    name: "Sound",
    component: () => import("@/views/sound/index.vue"),
  },
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/login.vue"),
  },
  {
    path: "/404",
    name: "404",
    component: () => import("@/views/error/404.vue"),
  },
  {
    path: "/:pathMatch(.*)",
    name: "Any",
    redirect: "/404",
  },
];
